import request from '@/utils/request'
// 获取角色列表
export const getRoles = () => request({
  url: 'roles',
  method: 'GET'
})
// 添加角色
export const postRole = data => request({
  url: 'roles',
  method: 'POST',
  data
})
// 添加角色
export const getRole = id => request({
  url: `roles/${id}`,
  method: 'GET'
})
// 修改角色
export const putRole = (id, data) => request({
  url: `roles/${id}`,
  method: 'PUT',
  data
})
// 修改角色
export const deleteRole = (id) => request({
  url: `roles/${id}`,
  method: 'DELETE'
})
